perm filename TEACH[1,VDS]7 blob
sn#101295 filedate 1974-05-06 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00012 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00003 00002 This file is intended to teach the use of the "E" editor. If
C00005 00003 Good for you.
C00008 00004 The P (Page) command, without a repeat argument, goes on to the next
C00015 00005 Type <alt>, inside a line or out, whenever you get into
C00026 00006 (Unbridled, continued from page 47)
C00027 00007 (E teacher -- continued from page 5).
C00028 00008 The E command terminates the edit by updating
C00029 00009 Welcome back.
C00036 00010 rept>A (ATTACH) causes <rept
C00040 00011 X enters EXTEND mode for one extend-mode command line.
C00047 00012 Start an edit by typing:
C00050 ENDMK
C⊗;
This file is intended to teach the use of the "E" editor. If
you read everything sequentially (or in the order specified),
and do everything several times, you should become proficient
at using E very quickly.
NOTATION:
α means <control>
β means <meta>
⊗ means αβ.
>> indicates a line which is present for you to play with.
! indicates that you should follow the instruction in that
line (it's usually best to read ahead a few lines first).
<cr> means carriage return.
<lf> means line feed.
<alt> means altmode.
<bs> means backspace.
<form> means form-feed.
always read down unless otherwise instructed.
CURRENT means the current line (the one with the arrow on the left).
If you get into a state you don't understand, type <alt> first,
ask questions later.
This is the second page of this file. The first page is a "directory"
page which will be explained later.
! Type ⊗P to go on to page 3. (This means to type <control><meta>P)
Good for you.
E has "LINE mode" commands (like ⊗P given above, and more given below),
"INTRA-line" commands (really the system line editor), and some other
(INSERT, EXTEND, ATTACH) modes which we'll get to. All LINE mode commands
may be invoked using ⊗-modified characters, except for <cr> and <ff>,
where all α-β combinations are legal, each modifying the meaning of the
basic command. So these are the only hard ones to get straight.
Almost any LINE command may be preceded by a repeat argument,
any number of ⊗<digit>s.
Usually a null repeat argument implies a repeat argument of 1.
Exceptions will be explicitly noted.
Repeat arguments will be indicated by <rept>
An arrow (← or ↔) in the leftmost column on the screen indicates CURRENT,
the line you can currently change. It's probably on the top line now.
<rept><cr> (no α, no β) is the main way of moving the arrow (CURRENT) down.
It moves CURRENT down <rept> lines, if possible (1 if <rept> is left out).
<rept><vt> (with any combination (including none) of α or β) moves CURRENT
back up <rept> (or 1) lines.
*** REMEMBER, "!" in column 1 means that you should do this now.
!Type <cr> a few times (NO CONTROL BITS ON THE <cr>!) to see what it does.
! Try <rept><vt> and <rept><cr>, to observe the effect of <rept>.
! Then type ⊗P to go on to page 4.
The ⊗P (Page) command, without a repeat argument, goes on to the next
page. If a repeat argument is present, the page with that number is
read. It is only when changing pages (or finishing the edit) that
changes you have made to this page (with commands to be discussed)
are recorded in the disk file. When the new page appears, the file
has been completely updated, and is safe over any catastrophe short
of earthquake. Any catastrophe you inflicted on the previous page is
cast in concrete.
So far, the pages have been short. It's good to keep them
fairly short (50-75 lines is a good number).
This page is presented to demonstrate more operations which are
useful on pages longer than 30 lines or so (one screenful).
The ⊗W (Window) command moves the bottom line on the screen to
the top line, thereby displaying the next screenful of the
current page. The top line becomes CURRENT.
!Type ⊗W to WINDOW the bottom line (down there↓) to
! the top of the screen.
This line is meaningless, and is included to avoid dead air.
This line is meaningless, and is included to avoid dead air.
This line is meaningless, and is included to avoid dead air.
This line is meaningless, and is included to avoid dead air.
This line is meaningless, and is included to avoid dead air.
This line is meaningless, and is included to avoid dead air.
This line is meaningless, and is included to avoid dead air.
This line is meaningless, and is included to avoid dead air.
This line is meaningless, and is included to avoid dead air.
This line is meaningless, and is included to avoid dead air.
This is the bottom line (down here←) (or was).
Thus opening up a whole new world.
!Now type <cr> a few times
! Down to here.
The ⊗J (Jump) command is like ⊗W (Window), except that it doesn't move
the bottom line to the top, but instead moves CURRENT to the top. The
next screenful, starting at CURRENT (which becomes line 1) will be
visible. If there are not enough lines left in the page, both ⊗W and
⊗J will move lines up only far enough to display the rest of the page
below CURRENT.
!Type <cr> enough times to reach the line following this one, then
! type ⊗J to JUMP this line to the top.
⊗L (Last) moves the top line to the bottom, displaying the previous screenful.
It is the inverse of ⊗W. The bottom line becomes CURRENT.
!READ THE next 2 lines before doing anything!
! Type ⊗L to move the top line to the LAST, then ⊗J or
! ⊗W to get back. Then type <cr> until you pass this line again.
Notice that the asterisks at the top or bottom of the screen
are replaced by dashes if there are lines in that direction which
you can't see. So you can always tell if you are at the beginning,
at the end, or in the middle of the page.
⊗W and ⊗L accept <rept> arguments. The command is repeated <rept> times.
Whenever a <cr> or similar command attempts to move to a line
not on the screen, a few more lines appear at that end of the screen
so the arrow will have somewhere to go. Of course, some lines disappear
from the other end.
!Try it by going to the top or bottom of the page, then go a little further.
! Come back here after you're done.
The following commands move the arrow (CURRENT) to visible lines. They differ
from W and friends, in that the lines attached to the arrow don't move
with it. They are more like <cr> or <vt> than ⊗W.
⊗T (Top) moves the arrow to the top line, then moves the text down the screen
a few lines, if possible; but the arrow stays with what was the top line.
⊗B (Bottom) moves the arrow to the bottom line, glitching up if possible.
⊗<, ⊗>, ⊗≤, ⊗≥ move the arrow up and down by varying amounts.
!Try all these arrow-moving things, and return to the lines below.
!Type ⊗2⊗P to look at page 2 again (pure nostalgia), then ⊗P your way
! back to page 5 (the next one)
Type <alt>, inside a line or out, whenever you get into
trouble. This will attempt to nullify whatever dumb thing
you or Fred did, and get you into a state where you might
expect to recover. You will probably soon need this lifesaver.
Now to edit some lines. Characters which, when typed, cause the line
editor to be started include non-control characters, along with α<space>,
α<tab>, αI, αS, αK, or αD, and almost all β characters. These
characters should be recognizable as those familiar to the line editor
(some additional α characters also trigger line editing in E -- these
are discussed below).
Typing one of these "line-entering" characters (call it `C') causes the text
of CURRENT to be sent to the line editor (in situ). It then applies the
`C' character you typed to the line. The effect is very much like that of
the system's <ctrl><cr> (get my last line back): it is as if you had
typed the text of CURRENT, then <ctrl><cr>, then `C'.
NOTE--If you continue to type characters at the line editor right after you
type the first one, but before the line editor cursors appear on your screen,
it is possible that some of the characters you type may be lost or
misinterpreted. It is usually ok to type ahead this way, but make sure that
when the line editor cursors appear, the line looks like what you want; if
not, type <alt> and try again.
!Get the arrow down to the data (>>) line below, then type any alphabetic
! character, do some line editing if you wish, followed by a <cr>.
>> The first character is not ">" any longer, but " " (fill in the blank)
As you can see, <cr> gets you out of the line, accepts the changes, and
goes on to the next line.
!Now change the following data line, terminating with <alt>.
>> This line remains invariant under all legal transformations!!
If you type a <rept> before entering the line editor with one of these
commands, the first non-<rept> character (the line-entering character)
will be done <rept> times. More specifically, if it is α<something>,
E will send α<rept>α<something>; otherwise, it will send whatever you
typed <rept> times. Thus ⊗5X will send XXXXX, but ⊗5αSX will send
α5αSX since αSαSαSαSαSX would not do what you want.
!Practice starting a line edit with αS, β<char>, αD, αK, αI, α<tab>,
! etc. Get out of αI mode (with α<space> or something) before typing <cr>.
! Use any line for practice, but there are some just below which you can change
! without destroying the lesson for tomorrow.
>> One fine high quality practice line.
>> Two fine high quality practice line.
>> Three fine high quality practice line.
>> Four fine high quality practice line.
>> Five fine high quality practice line.
There are some other things you can do while editing a line.
α<cr> terminates the edit of this line, leaves any (inter or intraline) insert
modes.
β<cr> inserts a carriage return and terminates the line-edit, leaving CURRENT
pointed at the (new) next line. Some adjustment of spaces and tabs in the
vicinity is made.
αD, when typed at the end of a line has the effect of deleting the carriage
return between this line and the next. Some adjustment of spaces and tabs in
the vicinity is made.
If you are in αI insert mode and type <cr>, the <cr> will be inserted
(like β<cr>), and you will be in insert mode, editing the (new) line
(unlike β<cr>).
⊗<vt> terminates the edit, then does a <vt>.
⊗↑ terminates the line edit, then α<tab>s to the end of the previous line.
⊗↓ terminates the line edit, then α<tab>s to the end of the next line.
Thus you can get out of a line, accepting the changes and proceeding to
the beginning or end of the next or previous line.
(The last two also work when you're not editing a line).
⊗V redraws the entire screen.
Try these:
! Go about halfway into a practice line, and type β<cr>.
! α<tab> out to the end of the first of 2 lines, and type αD. Wait.
! After the cursor sets up, terminate the edit
! Get into a line, then type αI, some characters, <cr>, and
! some more characters. Then type α<space>, followed by <cr>.
! Get into the second of 3 lines, and type ⊗<vt>.
! Ditto with ⊗↑.
! Ditto with ⊗↓.
If you are editing a line and type a α character which the line editor
doesn't understand, or a ⊗ character which E doesn't understand when
you are not editing a line, the character will be ignored by re-editing
the line, automatically spacing back out to the column where the illegal
character was typed.
! Get into a line, and type α# or αA or αJ or something. Wait for the
! cursor to stabilize again (if it doesn't show up, type <esc>R), and
! observe the result.
If you type a legal ⊗ character while line-editing, however, the line
will be accepted as edited. Then the command will be carried out.
Certain legal commands, (⊗P, ⊗D) are ignored anyway (too dangerous).
! Get into a line, and type ⊗J, or ⊗W, or ⊗≥. Also try ⊗P, ⊗D.
⊗<cr> puts the editor into line-insert mode.
In this mode the arrow (over there←) is a double arrow (↔) instead of a
single one (→). The previous CURRENT has moved down one line,
creating a vacuum, which you can fill by typing into it. Each time
you type <cr>, a new vacuous line will appear, and you will already be
editing the empty line.
To leave line-insert mode, type α<cr> to accept the line you're on and
get out. α<cr> is also good to terminate αI mode inside a line without
inserting the carriage return.
You may also leave line-insert mode by typing <alt> (good old <alt>).
If there is nothing in the line when you type <alt>, the line is deleted
completely (the next line moves up). If there are characters in the line
when you type <alt>, the line will remain, up to the <alt>.
⊗<cr> is legal while line-editing. It breaks the line like β<cr>, then
enters line-insert mode between the two halves of the old line.
! Try all this somewhere.
>> perhaps between here
>> and here
! Continued on page 7.
(Unbridled, continued from page 47)
Mark sighed breathlessly.
"But we must not go on meeting like this", Mary replied
in a non-sequiturial manner he had long since learned to expect.
(continued on page 115, column 3).
(E teacher -- continued from page 5).
<rept>⊗<cr> is different from ⊗<cr>. <rept>⊗<cr> inserts <rept> blank
lines below the arrow, never actually entering insert mode.
! Try it.
>> Perhaps between here
>> and here.
When you <cr> past the end of a page, new lines are created just ahead of
you, so you won't fall off. This is almost, but not quite like insert mode.
! Try it here, then advance to the next page.
The ⊗E command terminates the edit by updating
the current page if necessary, then blanking the screen
and exiting. Don't try it now, unless you want to waste
some time getting back here.
(page)
Welcome back.
<rept>⊗D is fun -- try it on the practice line below.
⊗. writes the current page into the disk file, if it has changed. This
is the equivalent of, but is faster than, the W command in SOS.
⊗Q causes the line just above CURRENT to be duplicated. The duplicate
line is then opened for editing. The effect is similar to that obtained
by α<cr> when you are not using E.
SEARCHING
The Repeat argument <rept> may, in most cases, be obtained associatively:
that is, by specifying some text string to be searched for in order
to specify a range of lines to be affected.
⊗F, followed by a string of non-activation characters, specifies a search
string. This string is used by different commands in different ways:
⊗Fsmith<cr> computes the number of lines from the arrow to a line containing
"smith", using that count as the <rept> factor-- in other words, the arrow
moves to the line containing "smith". (⊗↓ can replace <cr>).
⊗Fsmith⊗D computes the number of lines as above, then uses the count to
delete all lines down to, but not including the line with the match.
⊗Fsmith⊗J is the same as ⊗Fsmith<cr>⊗J.
⊗Fsmithα<cr> searches forward, as with ⊗Fsmith<cr>, but starting on the current
line. If it finds the string, it moves CURRENT to that line and enters
intra-line edit mode, with the line editor cursor under the first
character of the search string (the "s" in "smith" for this example).
<alt> cancels the current search string, and cancels any repeat factor already
calculated. Otherwise, ⊗F with a null string causes the previous value
to be used. ⊗F never crosses page boundaries.
Actually, there are two kinds of search commands, ⊗F and αF. The
former only matches a string if it is surrounded by non-alphameric
characters; that is, "Smithsonian" would be found by αF but not by
⊗F.
! Back up the page and try searching with ⊗F and with αF.
Go on to page 10.
rept>⊗A (ATTACH) causes <rept
with ⊗F) to be deleted from the page, from CURRENT to CURRENT+
<rept>-1 and placed in a special array, safe from harm. Up to 8 of
these lines are also displayed (with "|" along the left margin) at
CURRENT. These lines remain "ATTACHed", no matter where the arrow
(which has become a "|" for clarity) is moved.
When lines are attached, a large subset of commands are illegal;
Remaining legal commands are ⊗A, ⊗C, and arrow-moving commands, for
the most part. Legal commands may be experimantally discovered. In
addition, there are a few commands which are redefined or unique to
ATTACH mode:
⊗E -- EXIT Attach mode, and restore the lines to the current page
(which may be different from the original) in the position they
occupy on the screen. ⊗K -- exit ATTACH mode, and KILL the attached
lines -- they go away. ⊗R -- exit ATTACH mode, and REPLACE the
attached lines in their original page and line.
!Attach some lines and move them around. Try detaching from them in
any of ! the ways indicated.
>> a practice line. >> a practice line. >> a practice line. >> a
practice line. >> a practice line. >> a practice line.
<rept>⊗C is identical to ⊗A, except the original lines are not
removed from the file. The lines have been COPYd.
The next page describes EXTEND mode.
⊗X enters EXTEND mode for one extend-mode command line.
Extend mode commands are complete words, which may be
abbreviated as can commands to the TS monitor (that is,
you have to type enough characters). If any parameters
are required for a command, they should be separated from
the command by a space. <cr> terminates a command line.
After the command has been executed, E reverts to LINE mode.
Extend-mode commands:
DRAW -- Use this when your screen is covered with glitches, garbage,
etc., after doing an <esc>C to clear it. All segments of the
screen will be re-displayed. Otherwise, only those things which
change are redrawn. This command will happen automatically as soon
as possible after an <esc> C is typed.
Typing ⊗V also has this effect, even while editing a line.
! Type ⊗V
DDT -- If RAID is present in this version, branches to RAID. Execute
BACKαG to return.
DELETE -- deletes the page mark between this page and the next.
! Back up a few pages and try it.
MARK -- inserts a page mark between CURRENT and the line above
it. Displays the page on which CURRENT appears.
! Restore the page mark which you deleted.
READONLY -- if in read/write mode, writes the current page if any changes
were made, then inhibits further writing. You can modify a page in core,
but not on the disk.
READWRITE -- if in readonly mode, disables the write-inhibit.
CANCEL -- Reads the current page from the disk, without writing anything
out. Cancels any changes to the page since the last time it was written.
FIND -- Follow by space, then a string, then a <cr>.
This is like ⊗Fstring<cr>, except it will cross page boundaries to find
the line. The search string for FIND is remembered independently of
that for ⊗F. ⊗XFIND and αXFIND act analogously to ⊗F and αF.
GO -- Does what ⊗E does, except that, instead of exiting,
it repeats the last RPG command. It is like the G command of
SOS.
This document has not been entirely honest in describing the commands.
It has made available most of the features of the editor, but has not
necessarily described all the ways in which these features may be
invoked. Many commands have optional codings -- most may be called
using fewer control bits than we have required here. A complete
description of E features is available in the TV manual,
TVED.DCS[S,DOC], and the file TV2E.FW[UP,DOC] which describes how
E differs from TV.
One page remains (the next one). On it is described the various commands
one can give to begin editing a file.
Start an edit by typing:
ET filespec<cr>
A <file spec> is:
<file name, including extensions, PPNs and stuff>{switches}
where switches can be /R, meaning read-only, /nP for page n,
or /nL for line n. If you want more than one switch, you can
enclose them all in parentheses and omit the slashes, e.g.
ET FILE.EXT(3P24L)
to edit file FILE.EXT, starting on line 24 of page 3.
NOTE: Unlike the other editing commands (for TV, SOS, and TECO), an ET
command with a PPN does not copy the file to your own directory and
edit the copy; it actually edits the file in the area you specify!!
CE filespec<cr>
will create a file of the given name (omit PPN and switches). It will have
a directory page, and one more, blank, page.
________
N.B. A directory is a special first page, which is tacked on to the file
before the first actual data page, the first time the file is edited.
--------
! Type ⊗1⊗P to see what the directory page looks like.
More complicated commands, including the one you used to start this edit, are
described in the TV manual.
Credits: Dan Swinehart wrote TV, the original version of the display editor,
and also created the original version of this file to teach the use of TV.
The new version, E, was written and is maintained by Fred Wright, who
is the man to complain to about bugs. This file was modified to reflect
the differences between E and TV by Brian Harvey.
-30-